﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Provider/CarInsurance/Liberty_CarInsurance.master" AutoEventWireup="true" CodeFile="ProviderCarAgeCapacity.aspx.cs" Inherits="Provider_CarInsurance_ProviderCarAgeCapacity" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script src="~/controls/CE_Date.js" type="text/javascript"></script>
    <div class="provider_inner">
        <h1>Add/Edit Car Age & Capacity</h1>
		<fieldset>
    	    <legend></legend>
            <dl>
        	    <dt><label>Car Age</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlCarAge" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="ddlCarAge_SelectedIndexChanged">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="<=1"><=1</asp:ListItem>
                        <asp:ListItem Value="2">2</asp:ListItem>
                        <asp:ListItem Value="3">3</asp:ListItem>
                        <asp:ListItem Value="4">4</asp:ListItem>
                        <asp:ListItem Value="5">5</asp:ListItem>
                        <asp:ListItem Value="6">6</asp:ListItem>
                        <asp:ListItem Value="7">7</asp:ListItem>
                        <asp:ListItem Value="8">8</asp:ListItem>
                        <asp:ListItem Value="9">9</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value=">10">>10</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCarAge" runat="server" ControlToValidate="ddlCarAge"
                        ErrorMessage="Select OFD percentage." Display="Dynamic" 
                        ValidationGroup="caragecapacity" InitialValue="-1"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
        	    <dt><label>Car Capacity</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlCarCapacity" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="ddlCarCapacity_SelectedIndexChanged">
                        <asp:ListItem Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="<1000"><1000</asp:ListItem>
                        <asp:ListItem Value="1000 - 1599">1000 - 1599</asp:ListItem>
                        <asp:ListItem Value="1600 - 1999">1600 - 1999</asp:ListItem>
                        <asp:ListItem Value=">=2000">>=2000</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvCarCapacity" runat="server" ControlToValidate="ddlCarCapacity"
                        ErrorMessage="Select Car Capacity." Display="Dynamic" 
                        ValidationGroup="caragecapacity" InitialValue="-1"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
        	    <dt><label>Current Rate</label></dt>
                <dd>
                    <asp:TextBox ID="txtRate" runat="server" MaxLength="10"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvRate" runat="server" ControlToValidate="txtRate"
                        ErrorMessage="Enter rate."  ValidationGroup="caragecapacity" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revRate" runat="server" ControlToValidate="txtRate"
                        ErrorMessage="Rate value is not valid."  ValidationGroup="caragecapacity" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Schedule Rate Update</label></dt>
                <dd>
                   <asp:RadioButtonList runat="server" ID="rdoEffectivity"  RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="EffectiveWhen">
                   <asp:ListItem Value="Yes">Yes</asp:ListItem>
                   <asp:ListItem Value="No">No</asp:ListItem>                   
                   </asp:RadioButtonList>
                  
                </dd>
            </dl>
            <div id="divNewRate" runat="server" visible="false">
             <dl>
                <dt>
                    <label>
                        Effectivity Date</label></dt>
                <dd>
                   <uc1:usrDate ID="usrEffectivityDate" ValidationGroup="caragecapacity" runat="server" IsNotLessThanToday="true" />
                  
                </dd>
            </dl>
            
             <dl>
                <dt>
                    <label>
                        New Rate</label></dt>
                <dd>
                    <asp:TextBox ID="txtNewRate" runat="server" MaxLength="5"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Enter new rate." Display="Dynamic" ValidationGroup="caragecapacity"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revNewRate" runat="server" ControlToValidate="txtNewRate"
                        ErrorMessage="Rate is not valid." ValidationGroup="caragecapacity" ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                </dd>
            </dl>
            </div>
            <dl>
        	    <dt><label>Status</label></dt>
                <dd>
                    <asp:CheckBox ID="chkStatus" runat="server" />
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Auth Code</label></dt>
                <dd>
                    <asp:TextBox ID="txtAuthCode" runat="server" TextMode="Password" MaxLength="12" Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvAuthCode" runat="server" ControlToValidate="txtAuthCode"
                        ErrorMessage="Enter auth code." ValidationGroup="caragecapacity"></asp:RequiredFieldValidator>
                </dd>
            </dl>
    	</fieldset>
         <fieldset class="action">
            <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
                ID="ibtBack" runat="server" CssClass="left_btn" ImageUrl="~/Provider/images/buttons/back1.gif" OnClick="ibtBack_Click" />
            <asp:ImageButton ID="btnSubmit" runat="server" CssClass="float_btn" ImageUrl="~/Provider/images/buttons/submit1.gif" ValidationGroup="caragecapacity"
                OnClick="btnSubmit_Click" />
            <asp:ImageButton ID="btnClearForm" runat="server" CausesValidation="False" OnClientClick="return confirm('Are you sure to clear form?');"
                CssClass="floatnext_btn" ImageUrl="~/Provider/images/buttons/new1.gif" OnClick="btnClearForm_Click" />
        </fieldset>
        <asp:Label ID="lblMessage" runat="server" CssClass="successmsg"></asp:Label>
        <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
    </div>
</asp:Content>

